how to solve insert node at tail of linked list